package com.fast.develop.core.web;

/**
 * @author 莫寅
 * @createTime 2022-06-18 05:15
 * @desc：
 */
public class MultiMappingRegistor implements MappingRegistor {

    private MappingRegistry mappingRegistry;

    public MultiMappingRegistor() {
        this.mappingRegistry = new MappingRegistry();
    }

    public void register(MappingRegistor mappingRegistor){
        mappingRegistry.register(mappingRegistor);
    }


    @Override
    public void registerMapping() {
        mappingRegistry.getMappingRegistors().values().stream().forEach(MappingRegistor::registerMapping);
    }

    @Override
    public String type() {
        return "all";
    }
}
